package cn.xuewenbao.edu.service;

import cn.xuewenbao.edu.entity.LearnRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;

import java.util.Map;

/**
 * <p>
 * 学习记录 服务类
 * </p>
 *
 * @author liubf
 * @since 2021-09-30
 */
public interface LearnRecordService extends IService<LearnRecord> {

    Result<?> updateLearnRecord(LearnRecord learnRecord);

    Double getCurrentTime(String userId, String contentId, String columnType, String contentSubject);

    /**
     * @return key: currentTime totalTime, 或者 map为 null
     */
    Map<String, Double> getCurrentTimeAndTotalTime(String userId, String contentId, String columnType, String contentSubject);

    Result<?> getLearnRecord(String userId, String columnType);
}
